{% extends 'ApiCloud/Base/layout.common.html.twig' %}

{% block main %}
    {% include "ApiCloud/Base/inc.head.light.html.twig" with {title:"我的联系人",back:1} %}
    <div class="pad5 c11">
        {#默认联系人#}
        <div class="padtb5 c12 fs8">默认联系人</div>
        <div class="addrBj50 padb3">
            <div class="pad10 tac c12 round3 bcf" v-if="!isTrue(defContact)">尚未设置</div>
            <div class="bcf lh2 pad10 fs10" v-if="isTrue(defContact)">
                <div> [[defContact.name]]</div>
                <div class="fs12">
                    [[defContact.phone]]
                </div>
            </div>
        </div>

        {#其他联系人列表#}
        <div>
            <div class="padt10 c12 fs8 flrc">
                <div class="flex1">全部联系人</div>
                <div>
                    <mu-button @click="goto('myContactAdd',{id:0})" flat :color="c1">新增</mu-button>
                </div>
            </div>
            <div class="bcf lh2 pad10 fs8 mart5" v-for="item in list">
                <div class="bcf lh2 pad10 fs10">
                    <div> [[item.name]]</div>
                    <div class="fs12">
                        [[item.phone]]
                    </div>
                </div>
                <div class="flrc bc13 round2 pad3">
                    <div class="flex1 marlr5 tac">
                        <mu-button @click="setDefault(item.id)" flat color="success" small>设为默认</mu-button>
                    </div>
                    <div class="flex1 marlr5 tac">
                        <mu-button @click="delContact(item.id)" flat class="flex1 marlr5" color="red" small>删除</mu-button>
                    </div>
                    <div class="flex1 marlr5 tac">
                        <mu-button @click="goto('myContactAdd',{id:item.id})" flat class="flex1 marlr5" color="primary" small>编辑</mu-button>
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
